#include <iostream>

using namespace std;

/**
 * @brief
 *
 *  ::  .*  .  ?:这四个运算符不能重载
 *
 */

//输入输出运算符

class test
{
public:
    // ostream& operator<<(ostream&os,const test&item);

public:
    int val;
};

//第一个输出流对象不能是const因为流需要改变
ostream &operator<<(ostream &os, const test &item)
{
    os << item.val;
    return os;
}

//重载输入运算符
istream&operator>>(istream&is,test&t){
    if(is){
        is>>t.val;
    }
    return is;
}

//算数和关系运算符
test operator+(const test&l,const test&r){
    test sum=l;
    sum.val+=r.val;

    return sum;
}


bool operator==(const test&l,const test&r){
    return l.val==r.val;
}









int main()
{

    return 0;
}